<extend file='resource/admin/base'/>
<block name="content">

    <!-- TAB NAVIGATION -->
    <ul class="nav nav-tabs" role="tablist">
        <li class="active"><a href="{{u('index')}}">文章列表</a></li>
        <li><a href="{{u('post')}}" >文章添加</a></li>

    </ul>
    <table class="table table-hover">
    	<thead>
    		<tr>
    			<th>编号</th>
                <th>文章标题</th>
                <th>文章作者</th>
                <th>操作</th>
            </tr>
    	</thead>
    	<tbody>
        <foreach from="$field" value="$d">
            <tr>
                <td>{{$d['arc_id']}}</td>
                <td>{{$d['arc_title']}}</td>
                <td>{{$d['arc_author']}}</td>
                <td>
                    <div class="btn-group btn-group-sm">
                        <a href="{{u('post',['arc_id'=>$d['arc_id']])}}" class="btn btn-success">编辑</a>
                        <a href="javascript:;" onclick="remove({{$d['arc_id']}})" class="btn btn-danger">删除</a>
                    </div>
                </td>
            </tr>
        </foreach>
    	</tbody>
    </table>
<!--    {{$field->links()}}-->
    <script>
        function remove(arc_id) {
            util.confirm('确定删除吗?',function(res){
                location.href = "{{u('remove')}}&arc_id=" + arc_id;
            })
        }
    </script>

</block>